home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / share21.zip / MANUAL.TXT < prev    next >
Text File  |  1996-09-02  |  13KB  |  324 lines

  1.                                                  
  2.                         TShareWare Component v2.1
  3.                            For Delphi 16/32 Bit
  4.                                                                   
  5.                     Copyright 1996  RealSoft Development
  6.  
  7.  
  8.  
  9.          TECHNICAL SUPPORT VIA E-MAIL  103256.3104@compuserve.com
  10.  
  11.            COMPUSERVE REGISTRATION : GO SWREG # 11829  US $19.95
  12.  
  13.  
  14. ------------------------------------------------------------------------------------------
  15.  
  16.  
  17.  
  18. What is TShareWare? 
  19.  
  20. TShareware is a custom Delphi component  that allows you to control usage of 
  21. your Delphi programs by unregistered users.   By dropping this component onto your 
  22. project and adding a few lines of code, you can start distributing "crippled" versions of 
  23. your programs, and hopefully receive many registrations.  Shareware can be very 
  24. profitable for you, and beneficial to customers who like to "try before they buy"!
  25.  
  26. How Does it Work?
  27.  
  28.     There are several types of shareware commonly seen in the software market today.  
  29. TShareWare supports three types:  NagWare, CounterWare, and TimerWare.  NagWare is 
  30. the most common type, and prompts users to register by displaying a popup dialog at 
  31. inconvienent times, sometimes frequently.  Counterware "counts" how many times a user 
  32. runs a particular program, and notifies them when they have reached the limit.  TimerWare 
  33. allows users to use a program for a specified time from the date of installing.  A new 
  34. feature called Delphi_IDE allows your project or component to run in Delphi only.  
  35.  
  36. The Secret File
  37.  
  38.     To protect your TimerWare and CounterWare from cheaters who will definitely 
  39. try to beat the program by re-installing or changing the system date, TShareWare stores 
  40. it's information in a special file written to the user's WINDOWS directory.  The only way 
  41. to restart the TimerWare or CounterWare is to delete this file.  Fortunately, we have 
  42. provided several ways to disguise this file so users would have to find a needle in a 
  43. haystack!  You are the only person who will know about the "secret" file.
  44.  
  45. Installing TShareWare
  46.     
  47.     To install the TShareWare component, first create a subdirectory of DELPHI 
  48. called INTENSE or use another directory on your Delphi search path.  Next, unzip the file 
  49. SHWARE.ZIP into the directory, and launch DELPHI.  Next, in Delphi, select OPTIONS 
  50. | INSTALL COMPONENTS, click ADD, and then type in the location of the directory.  
  51. Locate the file called SHWARE.PAS and select it.  Now press OK to rebuild the library.  
  52. A component group called INTENSE should appear, and TShareWare should be inside.
  53.  
  54. For Delphi2, you should copy all of the 32 bit files to a directory off of your Delphi2.0 
  55. search path and install the file SHWARE.PAS to your library from the COMPONENT 
  56. menu.  The documentation is the same for both components.  If you purchase the source 
  57. code, SHWARE.PAS will compile in both Delphi 16 and 32.
  58.  
  59.  
  60.  
  61.  
  62. Making a Project Shareware
  63.  
  64.     To use TShareWare in your Delphi project, first drop a TShareWare component 
  65. anywhere on your main form.  You should then customize the component for your 
  66. program by modifying its properties (see list of properties).  Whenever you need to display 
  67. the shareware dialog, add this line of code:  Shareware1.Execute.
  68. We suggest adding this line to your form's OnClose or OnCreate events.  The 
  69. following line of code will check the status of the shareware to see if it has expired:  
  70. If Shareware1.ShareStatus = ssExpired then {do something}
  71. That's all you'll need to use the basic features of the component.
  72.  
  73.  
  74. Making a Component Shareware
  75.  
  76.     To make a component shareware requires a more advanced understanding of 
  77. Delphi, and a few extra lines of code.  To use TShareWare in your custom component, 
  78. add SHWARE to your component's USES clause.  Next, add the following lines to your 
  79. component's CONSTRUCTOR, or another CAREFULLY chosen spot in your code:
  80.  
  81. Var 
  82.      ShareWare1 : TShareWare;
  83. Begin
  84.     ShareWare1 := TShareWare.Create(Self);
  85.      {modify shareware properties here}
  86.     ShareWare1.Execute;
  87.     {check shareware status if desired}
  88.      ShareWare1.Free;
  89. end;
  90.  
  91.  
  92. Note:  Be careful where you place this code!  If you place it in the wrong spot, you may 
  93. interfere with normal Delphi operations and cause problems.  We advise not to place 
  94. TShareWare in the DESTRUCTOR or LOADED procedures.
  95.  
  96.  
  97. Customizing TShareWare
  98.  
  99.     By changing the properties of the TShareWare component, either at design-time or 
  100. at run-time, you can customize it for your program.  The following pages define each of 
  101. TShareWare's properties and events.  You should know what all of the properties do to 
  102. take full advantage of the component.  
  103.  
  104.  
  105.  
  106.  
  107. NOTE:  DO NOT DISTRIBUTE SHWARE.PAS WITH YOUR PROGRAM FILES.  USERS 
  108. SHOULD NOT HAVE ACCESS TO THE TSHAREWARE PROGRAM ITSELF!
  109.  
  110.  
  111. TShareWare Properties and Events
  112.  
  113.  
  114. property AutoPreview  :  (prOFF, prON)
  115. By changing AutoPreview to prON, the ShareWare dialog will pop up exactly as it   
  116. will appear in your program.  This will allow you to preview it at design-time.
  117.  
  118. property BlockHeader   +  
  119.     Blockheader contains nested properties about the first "block" of the dialog.
  120.             This is usually the title of the product or program.
  121.  
  122. property BlockHeader.AlignmentText  :  (taCenter, taLeft, taRight)
  123.     Aligns the text in the block.
  124. property BlockHeader.BorderStyle  :  (bsNone, bsSingle)
  125.     Selects a border for the block
  126. property BlockHeader.Color  :  TColor
  127.     Selects the background color for the block
  128. property BlockHeader.Ctl3D  :  Boolean
  129.     Selects a 3-D look for the block
  130. property BlockHeader.Font  :  TFont
  131.     Selects the font for the block
  132. property BlockHeader.Lines  :  TStrings
  133.     Edits strings that make up the block text.
  134. ** Note:  We have recognized a problem with the RZStringlist  property editor 
  135. when used to edit BlockHeader Lines.  This is not a problem with TShareWare, as 
  136. it appears the RZ editor was not designed for "nested" TStrings properties.
  137. property BlockHeader.ScrollBars  : (ssNone, ssVertical, ssHorizontal, ssBoth)
  138.     Enables scrollbars for the block text.
  139.  
  140. property BlockInfo   + 
  141.     Blockinfo contains nested properties about the second "block" of the dialog.
  142.             This is usually a brief or detailed description of the product, and registration terms.
  143.  
  144. property BlockInfo.AlignmentText  :  (taCenter, taLeft, taRight)
  145.        Aligns the text in the block.
  146.  
  147.  
  148.  
  149. property BlockInfo.BorderStyle  :  (bsNone, bsSingle)
  150.     Selects a border for the block
  151. property BlockInfo.Color  :  TColor
  152.     Selects the background color for the block
  153. property BlockInfo.Ctl3D  :  Boolean
  154.     Selects a 3-D look for the block
  155. property BlockInfo.Font  :  TFont
  156.     Selects the font for the block
  157. property BlockInfo.Lines  :  TStrings
  158.     Edits strings that make up the block text.
  159. ** Note:  We have recognized a problem with the RZStringlist  property editor 
  160. when used to edit BlockHeader Lines.  This is not a problem with TShareWare, as 
  161. it appears the RZ editor was not designed for "nested" TStrings properties.
  162. property BlockInfo.ScrollBars  : (ssNone, ssVertical, ssHorizontal, ssBoth)
  163.     Enables scrollbars for the block text.
  164.  
  165. property BlockOrder    +
  166.     BlockOrder contains nested properties about the first "block" of the dialog.
  167.             This is usually the ordering and pricing information about the product.
  168. property BlockOrder.AlignmentText  :  (taCenter, taLeft, taRight)
  169.     Aligns the text in the block.
  170. property BlockOrder.BorderStyle  :  (bsNone, bsSingle)
  171.     Selects a border for the block
  172. property BlockOrder.Color  :  TColor
  173.     Selects the background color for the block
  174. property BlockOrder.Ctl3D  :  Boolean
  175.     Selects a 3-D look for the block
  176. property BlockOrder.Font  :  TFont
  177.     Selects the font for the block
  178. property BlockOrder.Lines  :  TStrings
  179.     Edits strings that make up the block text.
  180. ** Note:  We have recognized a problem with the RZStringlist  property editor 
  181. when used to edit BlockHeader Lines.  This is not a problem with TShareWare, as 
  182. it appears the RZ editor was not designed for "nested" TStrings properties.
  183. property BlockOrder.ScrollBars  : (ssNone, ssVertical, ssHorizontal, ssBoth)
  184.     Enables scrollbars for the block text.
  185.  
  186.  
  187.  
  188.  
  189.  
  190. property Caption  :  String
  191.     Sets the caption of the shareware dialog window
  192.  
  193. property Color  :  TColor
  194.     Sets the color of the shareware dialog form
  195.  
  196. property DisplayStatus  :  Boolean
  197.     Determines whether or not the dialog will display the registration status
  198.     at the bottom of the form.
  199.  
  200. property Enabled  :  boolean
  201.     Setting enabled to false will stop the dialog from being displayed
  202.     even if the Execute method is called.
  203.  
  204. property FileDate : String
  205.     Sets the date of the "secret file".  We suggest using a date that will be difficult to     
  206.     pick out from the other files in the WINDOWS directory.  If you do not specify a
  207.     date, the current date will be used.
  208.  
  209. property FileHide : Boolean
  210.     Setting this property to true will make the "secret file" attribute hidden.
  211.  
  212. property FileName : String
  213.     This property contains the name of the "secret file".  We suggest using a name that 
  214.     will fool nosy users, such as WINDAT.DLL or any other disguising name.
  215.             **Note: If you do not specify a filename, the "secret file" will be disabled, and
  216.     TimerWare and CountWare will never change statuses!
  217.  
  218. property FileSize : Integer
  219.     Sets the size of the "secret file".  For hiding purposes, we allow variable sizes.
  220.             You must specify a file size between 32 and 32,000 for the "secret file" to work.
  221.  
  222. property Font : TFont
  223.     Sets the font for the dialog. Only affects the ShareStatus label and button captions.
  224.  
  225.  
  226.  
  227.  
  228.  
  229. property MaxCount : Integer
  230.     Sets the maximum number of times that CountWare allows users run a program.
  231.  
  232. property MaxDays : Integer
  233.     Sets the maximum number of days that TimerWare allows users run a program.
  234.  
  235.  
  236. property Name : String
  237.     Name of the component
  238.  
  239. property Password : String
  240.     Upon entering a password , a "register" button will appear on the dialog.  Users
  241.     can then register the component at any time after purchasing a password from you.
  242.  
  243. property ShareStatus : (ssUnRegistered, ssRegistered, ssExpired, ssTampered)
  244.     ShareStatus allows you to check the current status of the shareware program.
  245.     You can use ShareStatus in your program to trigger other events in your program.
  246.  
  247.     ssExpired means the user has exceeded the limit of TimerWare or CounterWare.     
  248.     ssUnRegistered means the software has not been registered, but has not expired.
  249.     ssRegistered means the user has entered the correct password to register.
  250.     ssTampered means the user has modified the "secret file" or changed the date!
  251.  
  252. property ShareType : (stNagWare, stCounterWare, stTimerWare, stDelphi_IDE)
  253.     ShareType sets the type of shareware.  Note that TimerWare and CounterWare 
  254.     require other important properties to be set to work properly.  If you set it to
  255.     Delphi_IDE, you can create a program that will only work while Delphi is running.           
  256.  
  257. property SilentMode : boolean
  258.     SilentMode allows you to use the ShareStatus and Timer/Counter features of 
  259.     TShareWare without displaying a dialog.  You can use your own dialog based
  260.     upon ShareStatus if you wish.
  261.  
  262.     ** Note:  ShareStatus is not updated until a call to EXECUTE is made.  You 
  263.     should turn SilentMode on, and then call EXECUTE before checking ShareStatus!
  264.  
  265. property Tag : Integer
  266.     Component tag.
  267.  
  268.  
  269.  
  270.  
  271.  
  272. Read-only property RemainCount : Integer
  273.     Contains current uses left in CounterWare.
  274.  
  275.  
  276. Read-only property RemainDays : Integer
  277.     Contains current Days left in TimerWare.
  278.  
  279.  
  280. event OnBeforeShow : 
  281.     Occurs just before dialog is displayed.
  282.  
  283. event OnAfterShow : 
  284.     Occurs just after dialog is displayed.
  285.  
  286. event OnRegister : 
  287.     Occurs after correct password has been input, and status = ssRegistered.
  288.  
  289. method Execute : 
  290.     Displays the TShareWare dialog and updates the ShareWare status.
  291.  
  292. method DelphiRunning :  boolean
  293. Allows you to determine if Delphi is running.  Also used internally for 
  294. stDelphi_IDE.  You can check if Delphi is Running, and if not, warn the
  295. user that your application will terminate unless they register or run Delphi.
  296.  
  297.  
  298. ------------------------------------------------------------------------------------
  299.  
  300.  
  301.  
  302. IMPORTANT NOTE: 
  303. ---------------
  304.  
  305.  IF YOU ARE DISTRIBUTING TSHAREWARE IN ONE OF YOUR 
  306. COMPONENTS (IN .DCU FORM), YOU MUST COPY THE ENTIRE
  307. CODE FROM SHWARE.PAS, AND ADD IT TO YOUR CODE TO BE 
  308. "COMPILED IN" TO IT.  IF YOU ARE USING OUR DIALOG FORM, 
  309. YOU SHOULD ALSO INCLUDE THE .DFM FILE (RENAMING IT IS OK).
  310.  
  311. IF YOU DO NOT DO THIS, USERS WITHOUT TSHAREWARE WILL NOT
  312. BE ABLE TO INSTALL YOUR COMPONENT!  THEY WILL RECEIVE A
  313. "UNIT SHWARE.DCU NOT FOUND" ERROR.
  314.  
  315. DISCLAIMER:
  316. ----------
  317.  
  318. USE THIS COMPONENT AT YOUR OWN RISK.
  319. REALSOFT  DEVELOPMENT WILL NOT BE HELD RESPONSIBLE FOR 
  320. LOSS OF SALES DUE TO IMPROPER USE, OR MALFUNCTION OF THIS 
  321. SOFTWARE.
  322.  
  323.  
  324.